package com.microservices.controller;

import com.microservices.entity.Department;
import com.microservices.services.DepartmentFeignServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/department")
public class DepartmentController {

    @Autowired
    private DepartmentFeignServices departmentFeignServices;

    @RequestMapping("/getDepartmentList")
    public List<Department> getDepartmentList() {
        return departmentFeignServices.getDepartmentList();
    }
}
